<template>
  <div class="app-main-container">
    <el-tabs v-model="activeTab">
      <el-tab-pane label="教练信息" name="1"><CoachAdmin v-if="activeTab === '1'" :meta="meta" @changeTabs="changeTabs" /></el-tab-pane>
      <el-tab-pane label="上课记录" name="2"><ClassRecord v-if="activeTab === '2'" :meta="meta" @changeTabs="changeTabs" /></el-tab-pane>
      <el-tab-pane v-if="meta.indexOf('TeacherLevelList') > -1" label="教练等级管理" name="3"><LevelAdmin v-if="activeTab === '3'" :meta="meta" @changeTabs="changeTabs" /></el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
import CoachAdmin from './coachAdmin'
import ClassRecord from './classRecord'
import LevelAdmin from './levelAdmin'
export default {
  name: 'CoachManagementList',
  components: {
    CoachAdmin,
    ClassRecord,
    LevelAdmin
  },
  data() {
    return {
      activeTab: '1',
      meta: []
    }
  },
  created() {
    this.meta = this.$route.meta.buttons || []
  },
  methods: {
    changeTabs(val) {
      this.activeTab = val
    }
  }

}
</script>

<style lang="scss" scoped>

</style>
